package com.leyou.common.enums;

import lombok.Getter;

//枚举类，循环利用里面的变量
@Getter
public enum ExceptionEnum {
    PRICE_CANNOT_BE_NULL(400, "价格不能为空！"),
    DATA_TRANSFER_ERROR(204,"没找到相应的数据"),
    CATEGORY_NOT_FOND(500,"数据转换出错"),
    BRAND_NOT_FOUND(204,"没找到相应的品牌数据"),
    INSERT_OPERATION_FAIL(500,"数据保存失败"),
    INVALID_FILE_TYPE(500,"没有该文件的类型"),
    FILE_UPLOAD_ERROR(500,"保存图片出错"),
    UPDATE_OPERATION_FAIL(500,"图片上传失败"),
    CATEGORY_NOT_FOUND(204,"没有对应的分类信息"),
    UPDATE_GENGXIN_FAIL(500,"数据更新失败"),
    SPEC_NOT_FOUND(204,"规格组内的规格参数信息出错了"),
    GOODS_NOT_FOUND(204,"没有对应的商品信息"),
    INVALID_PARAM_ERROR(500,"参数错误"),
    GOODS_NOT_FOND(204,"没找到相应的数据"),
    INVALID_PARAM(500,"对象不存在"),
    DIRECTORY_WRITER_ERROR(500,"找不到指定目录"),
    FILE_WRITER_ERROR(500,"文件保存异常"),
    SEND_MESSAGE_ERROR(500,"发送短信失败，远程服务器崩溃"),
    INTERNAL_SERVER_ERROR(500,"服务器内部异常"),
    INVALID_VERIFY_CODE(500,"验证码错误"),
    INVALID_USERNAME_PASSWORD(500,"用户名或者密码错误"),
    USER_NOT_FOUND(400,"找不到用户异常")
    ;


    private int status;
    private String message;

    ExceptionEnum(int status, String message) {
        this.status = status;
        this.message = message;
    }
}